PREFIX = /usr/local
LDFLAGS = -L$(PREFIX)/lib  -DHAVE_CONFIG_H
#LDFLAGS = -L$(PREFIX)/lib -framework vecLib -DHAVE_CONFIG_H
CXXFLAGS = -I$(PREFIX)/include -c -O3 -funroll-loops -Wall -DHAVE_CONFIG_H
#CXXFLAGS = -I$(PREFIX)/include -c -O3 -funroll-loops -mcpu=i386 -Wall -DHAVE_CONFIG_H
LIBS = -lnox -lepetra -lepetraext -lnoxepetra -lnoxtestutils -lloca -llocaepetra -laztecoo -lifpack -lanasazi -lteuchos -lg2c -L/usr/lib/ 

default: exp


all: exp step calcz



exp: bin/exptrack

bin/exptrack: WaveProb.o ExpWaveProb.o ExpProbInterface.o ExpTrack.o
	g++ WaveProb.o ExpWaveProb.o ExpProbInterface.o ExpTrack.o $(LDFLAGS) $(LIBS) -o bin/exptrack

WaveProb.o: WaveProb.C WaveProb.H Global.H
	g++ $(CXXFLAGS) WaveProb.C

ExpWaveProb.o: ExpWaveProb.H ExpWaveProb.C WaveProb.C WaveProb.H Global.H
	g++ $(CXXFLAGS) ExpWaveProb.C

ExpProbInterface.o: ExpProbInterface.H ExpProbInterface.C Global.H
	g++ $(CXXFLAGS) ExpProbInterface.C

ExpTrack.o: ExpTrack.C ExpWaveProb.H ExpWaveProb.C WaveProb.C WaveProb.H Global.H
	g++ $(CXXFLAGS) ExpTrack.C




step: bin/steptrack

bin/steptrack: WaveProb.o StepWaveProb.o StepProbInterface.o StepTrack.o
	g++ WaveProb.o StepWaveProb.o StepProbInterface.o StepTrack.o $(LDFLAGS) $(LIBS) -o bin/steptrack

StepWaveProb.o: StepWaveProb.H StepWaveProb.C WaveProb.C WaveProb.H Global.H
	g++ $(CXXFLAGS) StepWaveProb.C

StepProbInterface.o: StepProbInterface.H StepProbInterface.C Global.H
	g++ $(CXXFLAGS) StepProbInterface.C

StepTrack.o: StepTrack.C StepWaveProb.H StepWaveProb.C WaveProb.C WaveProb.H Global.H
	g++ $(CXXFLAGS) StepTrack.C




calcz: bin/calcz

bin/calcz: CalcZ.C
	$(CXX) CalcZ.C -o bin/calcz



clean:
	rm -f *.o bin/exptrack bin/steptrack
